<div class="wrap">
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
	<tr>
	<td width="54px" height="43px" class="fr_lefttop"></td>
	<td height="43px" class="fr_centertop" ></td>
	<td width="48px" height="43px" class="fr_righttop"></td>
	</tr>
	<tr>
	<td width="54px" class="fr_leftmiddle" >&nbsp;</td>
	<td class="fr_centermiddle">
{if $page_message == null}
	<div id="ajaxResponse_page" class="ajaxResponse"></div>
{else}
	<div id="ajaxResponse_page" class="ajaxResponse fade" style="display:block">{$page_message}</div>
{/if}
<h2>{t}Page Management{/t}</h2>
	<table width="100%">
		<tr>
			<td width="50%">
			<form method="post" action="?mod={$smarty.get.mod}&sub1=page&act=search">
				<label for="search_key">{t}Search Pages ...{/t}</label><br />
				<input type="text" name="s" id="search_key" value="{$smarty.post.s}" size="20">
				<span class="submit" align="right">
					<input type="submit" name="submit" value="{t}Search{/t}" />
				</span>
			</form>
			</td>
		<!--
			<td>
			<form method="post" action="?mod={$smarty.get.mod}&sub1=page&act=browse_cat">
				<label for="cat">{t}Browse By Category ...{/t}</label><br />
				<select name='cat' id='cat' class='postform'>
		  				<option value='0'>{t}None{/t}</option>
			  			{foreach name=cat from=$CATS item=item}
				  			{if $item->cat_ID == $smarty.post.cat}
			  					<option selected id='cat_parent-{$item->cat_ID}' value='{$item->cat_ID}'>
				  			{else}
								<option id='cat_parent-{$item->cat_ID}' value='{$item->cat_ID}'>
							{/if}
							{$item->temp_name|replace:"—":"&nbsp;&nbsp;&nbsp;"}
							</option>
						{/foreach}
				</select>
				<span class="submit" align="right">
					<input type="submit" name="submit" value="{t}Browse{/t}" />
				</span>
			</form>
			</td>-->
		</tr>
	</table>
	
	<table class="widefat">
		<thead>
		{if $COMMENT != ""}
		<tr>
			<th scope="col" colspan="6" style="text-align: center">
				{$COMMENT}
			</th>
		</tr>
		{/if}
		<tr>
			<th scope="col" style="text-align: center">{t}ID{/t}</th>
	        <th scope="col">{t}Title{/t}</th>
	        <th scope="col" style="text-align: center">{t}Status{/t}</th>
	        <th scope="col" style="text-align: center">{t}Owner{/t}</th>
	        <th colspan="2" style="text-align: center">{t}Action{/t}</th>
		</tr>
		</thead>
		<tbody id="pagetable">
			{foreach name=page from=$PAGES item=item}
				<tr id="page-{$item->page_id}" class="{cycle values=,alternate"}">
					<th scope='row' style='text-align: center'>{$item->page_id}</th>
					<td>{$item->page_name}</td>
					<td align='center'>{$item->page_status}</td>
					<td align='center'>{$item->user_login|default:"-"}</td>
					<td><a href="?mod={$smarty.get.mod}&sub1=page&act=editpage&id={$item->page_id}" class='edit'>{t}Edit{/t}</td>
					<td><a onclick="onDeletePage('?mod={$smarty.get.mod}&sub1=page', '{$item->page_id}', 'ajaxResponse_page')" 
							class='delete'>{t}Delete{/t}</td>
				</tr>
			{/foreach}
		</tbody>
	</table>
	<p>
		<a href="?mod={$smarty.get.mod}&sub1=page&act=newpage">
				<b>{t escape=no}Create New Page &raquo;{/t}</b></a>
	</p>
	</td>
	<td width="48px" class="fr_rightmiddle"></td>
	</tr>
	<tr>
	<td width="54px" height="60px" class="fr_leftbot" ></td>
	<td height="60px" class="fr_centerbot"></td>
	<td width="48px" height="60px" class="fr_rightbot" ></td>
	</tr>
</table>
</div>
